<template>
  <el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialog" title="历史版本记录" width="800px">
    <!--表格渲染-->
    <DataGridTable
      v-loading="loading"
      :sup_this="sup_this"
      :data="data.rtnList"
      :total="total"
      :show-page="false"
      :show-cell-class="true"
      :multi-select="false"
      :show-row-number="true">
      <DataGridColumnSlot :show-overflow-tooltip="true" prop="funProcessName" label="业务类型">
        <template slot-scope="scope">
          <edit :data="scope.row" :sup_this="sup_this" />
        </template>
      </DataGridColumnSlot>
      <DataGridColumn prop="selfStateName" label="状态"/>
      <DataGridColumnSlot :show-overflow-tooltip="true" prop="busDate" label="业务日期">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.busDate) }}</span>
        </template>
      </DataGridColumnSlot>
    </DataGridTable>
  </el-dialog>
</template>

<script>
import initData from '@/mixins/initData'
import { parseTime } from '@/utils/index'
import edit from './edit'
import { loadHistoryDataUrl } from '@/api/system/formSet'

export default {
  components: { edit },
  mixins: [initData],
  props: {
    sup_this: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      sysGenCode: '',
      loading: false,
      dialog: false
    }
  },
  created() {
    this.url = loadHistoryDataUrl()
  },
  methods: {
    parseTime,
    async beforeInit() {
      this.paramBean.sysGenCode = this.sysGenCode
      return true
    }
  }
}
</script>

<style scoped>
</style>
